package cn.edu.hyit.hjq.volunteems.backend.mapper;

import cn.edu.hyit.hjq.volunteems.backend.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    List<User> findAllUser();
    User findByUsername(@Param("username") String username);
    User findByUserId(@Param("userId") String userId);

    void insertUser(User user);
    void insertUserSkill(@Param("userId") String userId, @Param("skillIdList") List<Integer> skillIdList);
    void insertUserRole(@Param("userId") String userId, @Param("roleId") Integer roleId);

    int updateUserStatus(@Param("userId") String userId, @Param("status") Integer status);
}
